// 版权归陈超所有

#pragma once

#include "CoreMinimal.h"
#include "GameFramework/PlayerController.h"
#include "CC_PlayerController.generated.h"

class ICC_EnemyInterface;
class UInputMappingContext;
class UInputAction;


/**
 * 
 */
UCLASS()
class CC_AURA_API ACC_PlayerController : public APlayerController
{
	GENERATED_BODY()

public:
	ACC_PlayerController();

	virtual void PlayerTick(float DeltaTime) override;

protected:
	virtual void BeginPlay() override;

	virtual void SetupInputComponent() override;
private:
	//输入变量
	UPROPERTY(EditAnywhere, Category="Input")
	TObjectPtr<UInputMappingContext> CCContext;
	UPROPERTY(EditAnywhere, Category="Input")
	TObjectPtr<UInputAction> MoveAction;

	//鼠标追踪变量
	TScriptInterface<ICC_EnemyInterface> LastActor;	//上一帧拾取的接口指针
	TScriptInterface<ICC_EnemyInterface> ThisActor;	//当前帧拾取的接口指针
	
	void Move(const struct FInputActionValue& InputActionValue);

	void CurserTrace();	//鼠标追踪函数

	
};
